package com.strive.mapper;

import com.strive.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author strive.Peng
 * @since 2024-03-14
 */

@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {

    // 左连接查询 根据用户ID获取menuID
    List<Long> getNavMenuIds(Long userId);

    // 根据菜单的ID获取用户列表
    List<SysUser> listByMenuId(Long menuId);
}
